{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "import cv2 as cv\n",
    "\n",
    "filename =r'E:\\lina.png'\n",
    "img = cv.imread(filename)\n",
    "gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)\n",
    "\n",
    "cv.imshow('source img',img)\n",
    "cv.imshow('gray',gray)\n",
    "cv.waitKey()\n",
    "\n",
    "hsv = cv.cvtColor(img,cv.COLOR_BGR2HSV)\n",
    "\n",
    "cv.imshow('Hue',hsv[:,:,0])\n",
    "cv.imshow('Saturation',hsv[:,:,1])\n",
    "cv.imshow('Value',hsv[:,:,2])\n",
    "cv.waitKey()\n",
    "\n",
    "cv.imshow('Blue',img[:,:,0])\n",
    "cv.imshow('Green',img[:,:,1])\n",
    "cv.imshow('Red',img[:,:,2])\n",
    "\n",
    "cv.waitKey()\n",
    "cv.destroyAllWindows()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
